package com.demo.starter.domain.dto;

import com.demo.starter.domain.JobDO;
import lombok.Data;

@Data
public class JobOutputDTO {

    /**
     * 任务名称
     */
    private String jobName;
    /**
     * 任务分组
     */
    private String jobGroup;
    /**
     * 任务描述
     */
    private String description;
    /**
     * 执行类
     */
    private String jobClassName;
    /**
     * 执行时间
     */
    private String cronExpression;
    /**
     * 执行时间
     */
    private String triggerName;
    /**
     * 任务状态
     */
    private String triggerState;

    public JobOutputDTO(JobDO entity) {
        this.jobName = entity.getJobName();
        this.jobGroup = entity.getJobGroup();
        this.jobClassName = entity.getJobClassName();
        this.description = entity.getDescription();
        this.cronExpression = entity.getCronExpression();
        this.triggerName = entity.getTriggerName();
        this.triggerState = entity.getTriggerState();
    }
}
